// const before = require("./mock");
const before = require("vue-cli-fast-mock");
const config = require("./config");
module.exports = {
  lintOnSave: false,
  publicPath: config.BASE.static,
  devServer: {
    before,
    proxy: {
      // 目标主机 http://124.33.45.2/cnjdskbahvvlkjvn/nvjkdfnsk
      // 实际请求路径 http://localhost:8080/api/order/cnjdskbahvvlkjvn/nvjkdfnsk
      // "/mos/api/order": {
      //   target: "http://124.33.45.2",
      //   ws: true,
      //   changeOrigin: true,
      //   pathRewrite: {
      //     "^/mos/api/order": "/", // rewrite path
      //   }
      // }
      "/mos/api/": {
        target: "http://localhost:8888",
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          "/mos": "/"
        }
      }
    }
  }
};
